package study.三种方式实现生产者消费者模式.awaitAndSignal;

public class Producer extends Thread {
	@Override
	public void run() {
		storer.produce(number);
	}
	private Storer storer;
	private int number;
	public Producer ( Storer storer,String name )
	{
		this.storer=storer;
		Thread.currentThread().setName(name);
	}
	public Storer getStorer() {
		return storer;
	}
	public void setStorer(Storer storer) {
		this.storer = storer;
	}
	public int getNumber() {
		return number;
	}
	public void setNumber(int number) {
		this.number = number;
	}
	public Producer()
	{}
	public Producer(int number)
	{
		this.number=number;
	}

}
